package com.turing.post.organization.util;

import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 特约商户
 * 
 * @author zxp
 * @date 2012-12-14
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "MERCHANT")
public class Merchant implements java.io.Serializable {

	/**
	 * 0 – 未激活
	 */
	public static final String MERCHANT_NOTACTIVATE = "0";

	/**
	 * 1 – 已激活
	 */
	public static final String MERCHANT_ACTIVATE = "1";

	/**
	 * 0– 交易状态
	 */
	public static final String MERCHANT_TRANSTATUS = "0";

	/**
	 * 01 - pos
	 */
	public static final String MERCHANT_CHANNELMODE_POS = "01";

	/**
	 * 02 - 网上
	 */
	public static final String MERCHANT_CHANNELMODE_WEB = "02";

	/**
	 * 03 - 直联
	 */
	public static final String MERCHANT_CHANNELMODE_DIRECT = "03";

	/**
	 * 09 - 他行
	 */
	public static final String MERCHANT_CHANNELMODE_OTHER = "09";

	/**
	 * 商户id
	 */
	private String merchantNo;

	/**
	 * 老商户id
	 */
	private String oldMerchantNo;
	/**
	 * 商户名称
	 */
	private String merchantName;

	/**
	 * 行政区域
	 */
	private String regionNo;

	// /**
	// * 商业类型ID 参考MerchantType
	// */
	// private BigInteger merchantTypeId;
	/**
	 * 收益机构ID 收益归属
	 */
	private BigInteger incomeBranchId;

	/**
	 * 开发单位机构号
	 */
	private String developBranchNo;
	/**
	 * 联系人
	 */
	private String linkMan;
	/**
	 * 联系电话
	 */
	private String linkTele;
	/**
	 * 激活状态
	 */
	private String activate;
	/**
	 * 到期日
	 */
	private Date expired;
	/**
	 * 发卡商NO
	 */
	private String issueCompanyNo;
	/**
	 * 账务日期
	 */
	private Date tranDate;
	/**
	 * 交易状态
	 */
	private String tranStatus;
	/**
	 * 账务流水号
	 */
	private BigInteger tranSeqNo;
	/**
	 * 交易密钥
	 */
	private String tranKey;
	/**
	 * 当前余额
	 */
	private BigInteger balance;
	/**
	 * 对帐模式
	 */
	private String checkAccMode;

	/**
	 * 0 - 商户发起
	 */
	public static final String CHECKACCMODE_MERCHANT = "0";

	/**
	 * 1 - 无需对帐
	 */
	public static final String CHECKACCMODE_NOACC = "1";

	/**
	 * 渠道模式
	 */
	private String channelMode;

	/**
	 * 允许充值
	 */
	public final static String MERCHANT_ALLOW_DEPOSIT = "1";

	/**
	 * 是否允许充值0 –不允许1 – 允许
	 */
	private String allowDeposit;
	/**
	 * 充值额度限制类型 0 –按周期总充值额控制 1 – 按周期消费额控制
	 */
	private String depositLimitType;
	/**
	 * 充值限制周期 默认天数 >=0 0为当天,1为昨天到今天
	 */
	private Integer depositLimitCycle;
	/**
	 * 充值额度上限>=0 默认0 不限制
	 */
	private BigInteger depositLimit;
	/**
	 * 单笔充值额度上限
	 */
	private BigInteger eachDepositLimit;
	/**
	 * 默认充值归属销售机构
	 */
	private String depositSaleBranchNo;
	/**
	 * 备注
	 */
	private String remark;

	/**
	 * 是否需要消费业务类型
	 */
	private String needBusinessType;

	/**
	 * 无需业务类型
	 */
	public static final String BUSINESSTYPE_NEEDNT = "0";

	/**
	 * 需业务类型
	 */
	public static final String BUSINESSTYPE_NEED = "1";

	/**
	 * 单位信息编号
	 */
	private BigInteger organizeId;

	/**
	 * 单笔消费上限
	 */
	private BigInteger eachPaidLimit;

	/**
	 * 当日累计消费金额上限
	 */
	private BigInteger dayPaidTotalLimit;

	/**
	 * 当日累计消费次数上限
	 */
	private BigInteger dayPaidCountLimit;

	/**
	 * 保证金
	 */
	private BigInteger guaranteeAmount;

	/**
	 * 预付款余额
	 */
	private BigInteger prepaidBalance;

	/**
	 * 预付款下限
	 */
	private BigInteger prepaidLowLimit;

	public Merchant() {

	}

	@Column(name = "DAYPAIDTOTALLIMIT", nullable = false)
	public BigInteger getDayPaidTotalLimit() {
		return dayPaidTotalLimit;
	}

	public void setDayPaidTotalLimit(BigInteger dayPaidTotalLimit) {
		this.dayPaidTotalLimit = dayPaidTotalLimit;
	}

	@Column(name = "DAYPAIDCOUNTLIMIT", nullable = false)
	public BigInteger getDayPaidCountLimit() {
		return dayPaidCountLimit;
	}

	public void setDayPaidCountLimit(BigInteger dayPaidCountLimit) {
		this.dayPaidCountLimit = dayPaidCountLimit;
	}

	@Column(name = "EACHPAIDLIMIT", nullable = false)
	public BigInteger getEachPaidLimit() {
		return eachPaidLimit;
	}

	public void setEachPaidLimit(BigInteger eachPaidLimit) {
		this.eachPaidLimit = eachPaidLimit;
	}

	@Column(name = "ORGANIZEID", nullable = false)
	public BigInteger getOrganizeId() {
		return organizeId;
	}

	public void setOrganizeId(BigInteger organizeId) {
		this.organizeId = organizeId;
	}

	@Column(name = "NEEDBUSINESSTYPE", nullable = false)
	public String getNeedBusinessType() {
		return needBusinessType;
	}

	public void setNeedBusinessType(String needBusinessType) {
		this.needBusinessType = needBusinessType;
	}

	@Id
	@Column(name = "MERCHANTNO", nullable = false)
	public String getMerchantNo() {
		return merchantNo;
	}

	public void setMerchantNo(String merchantNo) {
		this.merchantNo = merchantNo;
	}

	@Column(name = "MERCHANTNAME")
	public String getMerchantName() {
		return merchantName;
	}

	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}

	@Column(name = "REGIONNO")
	public String getRegionNo() {
		return regionNo;
	}

	public void setRegionNo(String regionNo) {
		this.regionNo = regionNo;
	}

	// @Column(name = "MERCHANTTYPEID")
	// public BigInteger getMerchantTypeId() {
	// return merchantTypeId;
	// }
	//
	// public void setMerchantTypeId(BigInteger merchantTypeId) {
	// this.merchantTypeId = merchantTypeId;
	// }

	@Column(name = "LINKMAN")
	public String getLinkMan() {
		return linkMan;
	}

	public void setLinkMan(String linkMan) {
		this.linkMan = linkMan;
	}

	@Column(name = "LINKTELE")
	public String getLinkTele() {
		return this.linkTele;
	}

	public void setLinkTele(String linkTele) {
		this.linkTele = linkTele;
	}

	@Column(name = "ACTIVATE")
	public String getActivate() {
		return this.activate;
	}

	public void setActivate(String activate) {
		this.activate = activate;
	}

	@Column(name = "EXPIRED")
	public Date getExpired() {
		return this.expired;
	}

	public void setExpired(Date expired) {
		this.expired = expired;
	}

	@Column(name = "TRANDATE")
	public Date getTranDate() {
		return this.tranDate;
	}

	public void setTranDate(Date tranDate) {
		this.tranDate = tranDate;
	}

	@Column(name = "TRANSTATUS")
	public String getTranStatus() {
		return this.tranStatus;
	}

	public void setTranStatus(String tranStatus) {
		this.tranStatus = tranStatus;
	}

	@Column(name = "TRANKEY")
	public String getTranKey() {
		return tranKey;
	}

	public void setTranKey(String tranKey) {
		this.tranKey = tranKey;
	}

	@Column(name = "BALANCE")
	public BigInteger getBalance() {
		return this.balance;
	}

	public void setBalance(BigInteger balance) {
		this.balance = balance;
	}

	@Column(name = "OLDMERCHANTNO")
	public String getOldMerchantNo() {
		return this.oldMerchantNo;
	}

	public void setOldMerchantNo(String oldMerchantNo) {
		this.oldMerchantNo = oldMerchantNo;
	}

	@Column(name = "TRANSEQNO")
	public BigInteger getTranSeqNo() {
		return tranSeqNo;
	}

	public void setTranSeqNo(BigInteger tranSeqNo) {
		this.tranSeqNo = tranSeqNo;
	}

	@Column(name = "CHECKACCMODE")
	public String getCheckAccMode() {
		return checkAccMode;
	}

	public void setCheckAccMode(String checkAccMode) {
		this.checkAccMode = checkAccMode;
	}

	@Column(name = "CHANNELMODE")
	public String getChannelMode() {
		return channelMode;
	}

	public void setChannelMode(String channelMode) {
		this.channelMode = channelMode;
	}

	@Column(name = "INCOMEBRANCHID")
	public BigInteger getIncomeBranchId() {
		return incomeBranchId;
	}

	public void setIncomeBranchId(BigInteger incomeBranchId) {
		this.incomeBranchId = incomeBranchId;
	}

	@Column(name = "developBranchNo")
	public String getDevelopBranchNo() {
		return developBranchNo;
	}

	public void setDevelopBranchNo(String developBranchNo) {
		this.developBranchNo = developBranchNo;
	}

	@Column(name = "ISSUECOMPANYNO")
	public String getIssueCompanyNo() {
		return issueCompanyNo;
	}

	public void setIssueCompanyNo(String issueCompanyNo) {
		this.issueCompanyNo = issueCompanyNo;
	}

	@Column(name = "ALLOWDEPOSIT")
	public String getAllowDeposit() {
		return allowDeposit;
	}

	public void setAllowDeposit(String allowDeposit) {
		this.allowDeposit = allowDeposit;
	}

	@Column(name = "DEPOSITLIMITTYPE")
	public String getDepositLimitType() {
		return depositLimitType;
	}

	public void setDepositLimitType(String depositLimitType) {
		this.depositLimitType = depositLimitType;
	}

	@Column(name = "DEPOSITLIMITCYCLE")
	public Integer getDepositLimitCycle() {
		return depositLimitCycle;
	}

	public void setDepositLimitCycle(Integer depositLimitCycle) {
		this.depositLimitCycle = depositLimitCycle;
	}

	@Column(name = "DEPOSITLIMIT")
	public BigInteger getDepositLimit() {
		return depositLimit;
	}

	public void setDepositLimit(BigInteger depositLimit) {
		this.depositLimit = depositLimit;
	}

	@Column(name = "DEPOSITSALEBRANCHNO")
	public String getDepositSaleBranchNo() {
		return depositSaleBranchNo;
	}

	public void setDepositSaleBranchNo(String depositSaleBranchNo) {
		this.depositSaleBranchNo = depositSaleBranchNo;
	}

	@Column(name = "EACHDEPOSITLIMIT")
	public BigInteger getEachDepositLimit() {
		return eachDepositLimit;
	}

	public void setEachDepositLimit(BigInteger eachDepositLimit) {
		this.eachDepositLimit = eachDepositLimit;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "GUARANTEEAMOUNT", nullable = false)
	public BigInteger getGuaranteeAmount() {
		return guaranteeAmount;
	}

	public void setGuaranteeAmount(BigInteger guaranteeAmount) {
		this.guaranteeAmount = guaranteeAmount;
	}

	@Column(name = "PREPAIDBALANCE", nullable = false)
	public BigInteger getPrepaidBalance() {
		return prepaidBalance;
	}

	public void setPrepaidBalance(BigInteger prepaidBalance) {
		this.prepaidBalance = prepaidBalance;
	}

	@Column(name = "PREPAIDLOWLIMIT", nullable = false)
	public BigInteger getPrepaidLowLimit() {
		return prepaidLowLimit;
	}

	public void setPrepaidLowLimit(BigInteger prepaidLowLimit) {
		this.prepaidLowLimit = prepaidLowLimit;
	}
}